Nirali: add volunteer hours reporting#2199
Open
Nirali164 wants to merge 1 commit into
Open
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
implements # Volunteer Hours Reporting Backend APIs
This PR introduces new backend APIs to support Volunteer Hours Reporting functionality for Teams and Projects. The APIs provide committed hours data used by the frontend reporting system to generate nonprofit volunteer hour reports.
The implementation calculates committed hours using task estimated hours and supports date range filtering for report generation.
New APIs added:
Get the committed hours from the team
Get committed hours by Project
The APIs aggregate task estimated hours across related WBS items and projects/teams while supporting filtering using task scheduling dates (startedDatetime and dueDatetime).
These APIs are used to support:
Volunteer hours reports
Team hours reports
Project hours reports
Date range-based reporting functionality
Fixes # Priority High - Volunteer Hours Reporting Backend Support
Related PRS (if any):
This backend PR is related to the Volunteer Hours Reporting frontend PR.
To test this backend PR, check out the related frontend PR for Volunteer Hours Reports UI integration.
…
Main changes explained:
Create a new API endpoint for fetching committed hours by project
Create a new API endpoint for fetching committed hours by team
Add committed hours aggregation logic using task estimatedHours
Add date range filtering support using:
startedDatetime
dueDatetime
Aggregate committed hours through related WBS items and tasks
Exclude archived/inactive projects from report calculations
Add response formatting for frontend reporting integration
Improve backend reporting support for nonprofit volunteer tracking
Add logging and error handling for reporting APIs
Refactor reporting-related backend logic for improved maintainability
…
How to test:
Check into the current branch
Run:
npm install
npm start
Start the backend server locally
Use Postman or frontend integration to test APIs
Verify project committed hours API:
Returns committed hours grouped by project
Correctly aggregates estimated hours
Correctly applies date range filtering
Verify team committed hours API:
Returns committed hours grouped by team
Correctly aggregates task estimated hours
Correctly applies date range filtering
Verify archived projects are excluded from results
Verify API error handling for invalid requests
Verify frontend reports display correct data from APIs
API 1 GET /projects/committed-hours?fromDate=2026-01-01&toDate=2026-05-06
API 2 GET /teams/committed-hours?fromDate=2026-01-01&toDate=2026-05-06
Screen.Recording.2026-05-06.at.9.15.46.PM.mov